<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
        }

        .d2 {
            position: absolute;
            left: 3px;
            bottom: 60px;
            color: white;
            font-size: 12px;

        }

        .d2>div {
            float: left;
            margin-right: 10px;
            color: 6px;
        }

        #skipBtn {
            color: pink;
            width: 70px;
            height: 20px;
            border-radius: 10px;
            background-color: transparent;
            cursor: pointer;
            background-color: tomato;
            text-align: center;
            line-height: 20px;
        }
    </style>
</head>

<body>
    <div class="box">
        <video id="d1" src="https://img.tukuppt.com/video_show/2475824/00/02/19/5b527330214a6.mp4 "  controls  autoplay
            width="400px"></video>
        <div class="d2"  id="d2">
            <div>关闭</div>
            <div>上次看到:<span id="d4"></span></div>
            <div  id="skipBtn">跳转播放</div>



        </div>
    </div>
    <script>

        var playTime = localStorage.playTime;
      

        skipBtn.onclick = function () {
            if (playTime) {
           d1.currentTime=playTime;
    d2.style.display="none";

          }
        }

        setInterval(f, 100);
        function f() {

            localStorage.playTime = d1.currentTime;
        }
 function  f2(x){
     return Math.floor(x/60)+":"+(x%60);
     }
    t= f2(playTime);
    

   d4.innerHTML = t;

    </script>

</body>

</html>